High Efficiency Video Coding (HEVC) is a new coding standard that has been developed in recent years. In the High Efficiency Video Coding (HEVC) system, the fixed-size macroblock of H.264/AVC is replaced by a flexible block, named coding unit (CU). Pixels in the CU share the same coding parameters to improve coding efficiency. A CU may begin with a largest CU (LCU), which is also referred as coded tree unit (CTU) in HEVC. In addition to the concept of coding unit, the concept of prediction unit (PU) is also introduced in HEVC. Once the splitting of CU hierarchical tree is done, each leaf CU is further split into one or more prediction units (PUs) according to prediction type and PU partition. Several coding tools for screen content coding have been developed. These tools related to the present invention are briefly reviewed as follow.
Palette Mode Coding
A new coding tool, named screen content coding (SCC) has been developed for HEVC as disclosed in JCTVC-S1005 (Joshi, et al., “HEVC Screen Content Coding Draft Text 2”, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 19th Meeting: Strasbourg, FR, 17-24 October 2014, Document: JCTVC-S1005). The palette-based coding is performed based on a coding unit (CU).
In the palette mode coding process, derivation of the color palette and index map is described as follows. A color palette is derived first by three components of a pixel value for the 444 component. The color palette stores N major colors. In specific, the N major colors correspond to the most significant N pixels with peak values in the histogram are selected as major colors.
The pixel values that are close to a major color will be quantized to the major color. When calculate the distance of current pixel value with the major colors, three components will be taken into consideration. In particular, the absolute differences between the three components with the major color will be added and the result is used to determine which major color for assigning a current pixel to. The pixel will compare with each major color to find the closest one and the pixel is assigned a major color having a shortest distance. Other pixels that do not belong to the major color set (also named color palette or palette) are designated as escape pixels. For each pixel, a color index is assigned to indicate which color in the palette it belongs to. For escape pixels, a special color index will used to indicate the escape.
The information signaled for the palette coding is shown as follows:                1. palette signaling: the color index table (also called palette table) size is first transmitted followed by the palette elements (i.e., color values). The related syntax elements include:                    1.1 palette_share_flag: specifies whether previous palette table is used for the current CU;            1.2 palette_predictor_run: specifies which of previous palette table is re-used in the current palette table;            1.3 palette_num_signaled_entries: specifies the number of palette entries that are not predicted from previous palette table;            1.4 palette_entry: specifies pixel values for each component for entries that are not predicted from previous palette table;            1.5 palette_escape_val_present_flag: specifies the presence of escape pixel in the current CU;            1.6 cu_qp_delta_palette_abs: specifies the absolute value of the difference CuQpDeltaVal between the luma quantization parameter of the current coding unit and its prediction;            1.7 cu_qp_delta_palette sign flag: specifies the sign of CuQpDeltaVal;            1.8 cu_chroma_qp_palette_offset_flag: when present and equal to 1, specifies that an entry in the cb_qp_offset_list[ ] is used to determine the value of CuQpOffsetCb and a corresponding entry in the cr_qp_offset_list[ ] is used to determine the value of CuQpOffsetCr. cu_chroma_qp_palette_offset_flag equal to 0 specifies that these lists are not used to determine the values of CuQpOffsetCb and CuQpOffsetCr.            1.9 cu_chroma_qp_palette_offset_idx: when present, specifies the index into the cb_qp_offset_list[ ] and cr_qp_offset_list[ ] that is used to determine the value of CuQpOffsetCb and CuQpOffsetCr. When present, the value of cu_chroma_qp_palette_offset_idx shall be in the range of 0 to chroma_qp_offset_list_len_minus1, inclusive. When not present, the value of cu_chroma_qp_palette_offset_idx is inferred to be equal to 0; and            1.10 palette_transpose_flag: indicating the scanning order for palette prediction                        2. index map signaling: the pixels in the CU are represented by the indices by mapping each pixel value into an index according to the palette. The related syntax elements include:                    2.1 palette_run_type_flag: specifies run type of the current pixel;            2.2 palette_index_idc: indicating the palette entry use of the pixel in case that palette_run_type_flag is copy_index_mode;            2.3 palette_run_msb_id_plus1: (palette_run_msb_id_plus1−1) specifies index of the most significant bit in the binary representation of paletteRun. The value of palette_run_msb_id_plus1 shall be in the range of 0 to Floor(Log2((MaxPaletteRun))+1, inclusive;            2.4 palette_run_refinement_bits: specifies the refinement bits in the binary representation of paletteRun; and            2.5 palette_escape_val: specifies the quantized escape coded sample value for a component.                        
According to the existing HEVC practice, one palette table is signaled for each CU. Each entry of palette table can has three values with one value for each component. Table 1 shows an example of the palette table with three values for each entry corresponding to three color components.
TABLE 1Color indexPixel value0Y0Cb0Cr01Y1Cb1Cr12Y2Cb2Cr23Y3Cb3Cr3. . .. . .. . .. . .
The coding unit syntax related to palette coding is shown in Table 2. A test regarding whether palette mode is enabled (i.e., palette_mode_enabled_flag), whether ChromaArrayType is equal to 3 (i.e., 4:4:4 color format), whether the current prediction mode is Intra prediction mode (i.e., CuPredMode[x0][y0]==MODE_INTRA), and whether the IntraBC flag is not asserted (i.e., !intra_bc_flag[x0][y0]) is performed as indicated by Note (2-1) in Table 1. If the test in Note (2-1) is asserted, a palette mode flag (i.e., palette mode flag[x0][y0]) is included as indicated by Note (2-2). Whether the palette mode flag is set is tested as shown in Noe (2-3). If the palette mode flag is equal to 1, palette coding is applied to luma and chroma components using joint palette as indicated by Note (2-4).
TABLE 2coding_unit( x0, y0, log2CbSize ) {Note...... if( palette_mode_enabled_flag && ChromaArrayType == 3(2-1)  && CuPredMode[ x0 ][ y0 ] == MODE_INTRA)  palette_mode_flag[ x0 ][ y0 ](2-2) if( palette_mode_flag[ x0 ][ y0 ] )(2-3)  palette_coding( x0, y0, nCbS )(2-4) else {......
In current SCM3.0 (Screen Content Coding Test Model version 3.0) draft and software, for video data in the 444 format, most of the above flags are shared by the three color components. Furthermore, a single color palette is signaled for all color components of a current coding unit and each entry of the color palette consists of one sample value from each of the three color components. In order to conserve bit rate, the color palette may be coded using predictive coding, where the predictor may correspond to a reconstructed palette associated with a previous coded coding unit.
In various video coding applications, the video data may be in a non-444 color format, where the chroma color samples may be at reduced spatial resolution compared to the luma component. Therefore, the chroma sample may not exist for each luma sample. Therefore, it is desirable to develop palette coding techniques for non-444 video data.